GXNewShapeVector
You can use theGXNewShapeVector
function to create a new shape of any type.
void GXNewShapeVector(gxShapeType aType, const Fixed vector[]);
aType
- A reference to the shape whose geometry you want to change.
vector
- An array of fixed-point values to use as the new geometry.
- function result
- A reference to the new shape.
DESCRIPTION
TheGXNewShapeVector
function copies the default shape of the shape type specified by theaType
parameter, sets the owner count of the new shape to 1, initializes its geometry with the values in thevector
parameter, and returns a reference to it as the function result.Although this function creates a copy of the default shape, it does not create a copy of the default shape's style, ink, or transform. The new shape returned by this function contains references to same style, ink, and transform as the default shape. You can change the style using functions from Chapter 3, "Geometric Styles," and you can change the style, ink, and transform using functions from Inside Macintosh: QuickDraw GX Objects.
You may pass any number of values in the
vector
array; theGXNewShapeVector
function traverses this array as necessary to initialize the new shape's geometry. If you pass too few values in this parameter, the function posts the warningextra_data_passed_was_ignored
.If you specify a shape type that is not one of the geometric shape types, this function performs the actions described in the following table:
Shape type Action taken bitmap Creates a bitmap shape; expects the vector array to contain values corresponding to the fields of a bitmap structure picture Creates a picture shape with no overriding styles, inks, or transforms; expects the vector array to contain an array of shape references text Posts the error graphic_type_does_not_contain_points
glyph Posts the error graphic_type_does_not_contain_points
layout Posts the error graphic_type_does_not_contain_points
ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory shape_is_nil parameter_is_nil number_of_points_exceeds_implementation_limit number_of_contours_exceeds_implementation_limit size_of_polygon_exceeds_implementation_limit size_of_path_exceeds_implementation_limit illegal_type_for_shape (debugging version) count_is_less_than_one (debugging version) shape_access_not_allowed (debugging version) graphic_type_does_not_contain_points (debugging version) Warnings extra_data_passed_was_ignored SEE ALSO
For general information about each type of geometry, see "About Geometric Shapes" on page 2-5. For specific definitions of each type of geometry, see the section "Data Types" beginning on page 2-104.For information about related functions, see the descriptions of the
GXNeWPoint
,GXNeWLine
,GXNeWCurve
,GXNeWRectangle
,GXNeWPolygons
, andGXNeWPaths
functions on page 2-111 through page 2-119.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help